#include<QMessageBox>
#include "logindld.h"
#include "ui_logindld.h"

LoginDld::LoginDld(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::LoginDld)
{
    ui->setupUi(this);
    ui->pwdlineEdit->setEchoMode(QLineEdit::Password);
}

LoginDld::~LoginDld()
{
    delete ui;
}

void LoginDld::on_pushButton_clicked()
{
   if(ui->usrlineEdit->text()==tr("zhumeiqing")&&
           ui->pwdlineEdit->text()==tr("19830123"))
   {
       accept();
   }else
   {
       QMessageBox::warning(this,tr("error"),
                            tr("user name or pwd error!"),
                            QMessageBox::Yes);
       ui->usrlineEdit->clear();
       ui->pwdlineEdit->clear();
       ui->usrlineEdit->setFocus();
   }
}
